Last Updated February 26, 2013
The term particle system refers to a computer graphics technique that uses a large number of very small sprites or other graphic objects to simulate certain kinds of "fuzzy" phenomena, which are otherwise very hard to reproduce with conventional rendering techniques - usually highly chaotic systems, natural phenomena, and/or processes caused by chemical reactions.
Examples of such phenomena which are commonly replicated using particle systems include fire, explosions, smoke, moving water (such as a waterfall), sparks, falling leaves, clouds, fog, snow, dust, meteor tails, stars and galaxies, or abstract visual effects like glowing trails, magic spells, etc. - these use particles that fade out quickly and are then re-emitted from the effect's source.
An emmiter controls the position and movement of a particle system. The emmiter acts as the source of particles, and determines where and what rate the particles are generated. The emmiter will have a number of properties;
Typically the emmiter will randomly vary these properties around an average value.
During each update phase the emmitter will generate a number of particles based on the emmiter's properties. the number of particles generated will depend on time between updates and emmitter rate. The initial position of each particle is based on the emmiters psoition (& spawning surface).
The realisim of particle systems depend on the overall visual effect of many particles being rendered in a small area. Each particle is a visible element, usually one of three types;
Billboarding is a technique to cheaply simulate an object in a 3D environment, by only rendering a 2D image (sprite or texture) within the scene. The sprite is rendered in such a way that it always faced the camera.
Billboarding is frequently used in particle effects because it is cheap and the user is not looking at individual particles, but at the totality of the effect of 100's of overlapping sprites.
In XNA billboarding is done by generating a quad of vertices centered on teh origin, lying on the xy-plane and using the CreateBillboard method to generate the particle's world matrix
The texture used for the particle depends on the effect. Almost always the background of the partice is transparent and the visible part has a roundish shape.
After spawning the particles behaviour will depend on the effect. The particle can continue on it's initial velocity, may be influenced by forces (e.g. gravity or wind, air resistance), engage in flocking beahiour or follow some procedurally generated path.
Additionally, the particle may change size over time (get bigger for smoke effects). Non-circular particles will often slowly rotate and random angular velocities in order to help aceive a natural look.
Finally, the texture used for a particle may gradually change overtime (e.g. flame turns to smoke)
Particles usually don't exist forever, they have a set lifetime after which they are deleted. In order to avoid particles suddenly poping out of exisitance, they are programmed to become increasingly transparent as they approach the end of their lifespan. Particles may also go out of existance if the hit the ground or other objects.
Particles are usually drawn;
© Ken Power 1996-2016